home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Demos / Evatac Software / Preditor 3.0 / Tools / Extension Module Builder / Template.c < prev    next >
C/C++ Source or Header  |  1995-09-01  |  816b  |  42 lines

  1. /************************************************************
  2.  
  3.     Template.c
  4.     
  5.     Starter template for building Preditor 3.0 extensions.
  6.     
  7.     Creates a new document and inserts Hello World into it.
  8.  
  9.     © Copyright Evatac Software  1988-1995
  10.     All rights reserved
  11.  
  12. ************************************************************/
  13.  
  14. #include "PreditorExtension.h"
  15.  
  16. #include <SetupA4.h>
  17. #ifndef THINKC
  18. #include <A4Stuff.h>
  19. #else
  20. #define SetCurrentA4()    0; RememberA4()
  21. #define SetA4(x)        SetUpA4()
  22. #endif
  23.  
  24. #ifdef powerc
  25. ProcInfoType __procinfo = ExtensionUPPInfo;
  26. #endif
  27.  
  28. void main(
  29.     ExternalCallbackBlock        *callbacks,
  30.     WindowRef                    window
  31.     )
  32. {
  33.     long         saved_a4;
  34.  
  35.     saved_a4 = SetCurrentA4();
  36.  
  37.     extNewDocument(callbacks, kEdit);
  38.     extInsert(callbacks, (unsigned char *) "Hello World\r", 12);
  39.     
  40.     SetA4(saved_a4);
  41. }
  42.